<?php

namespace app\admin\validate;

use think\Validate;

class AuthGroup extends Validate
{    
    /**
     * 验证规则
     */
    protected $rule = [
        'pid|上级角色'  => 'require|integer|max:10',
        'name|角色名称'  => 'require|max:100',    
        // 'password' => 'require',
        // 'rules'  => '',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        // 'username.require'  =>  '登录名不能为空',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['pid','name',],
        'edit' => ['pid','name', 'status'],
    ];
}
